# Contributor: Milan P. Stanić <mps@arvanta.net>
# Maintainer: Heiko Bernloehr <Heiko.Bernloehr@FreeIT.de>
pkgname=lnav
pkgver=0.12.2
pkgrel=0
pkgdesc="advanced log file navigator and viewer"
url="https://lnav.org"
arch="all"
license="BSD-2-Clause"
makedepends="
	bash
	bzip2-dev
	curl-dev
	gpm-dev
	libarchive-dev
	libbsd-dev
	ncurses-dev
	pcre2-dev
	readline-dev
	sqlite-dev
	zlib-dev
	"
checkdepends="
	openssh-keygen
	xz
	"
subpackages="$pkgname-doc"
source="https://github.com/tstack/lnav/releases/download/v$pkgver/lnav-$pkgver.tar.gz
	rapidyaml.patch
	prqlc-c.patch
	"
options="!check" # failed on some tests

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-tinfo
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
20cc31ed8c69e4ba0971d581b9e8629d415b1025713200eec0b70070991dbd288af449775a6cb5cb239d3a20aee3f4adbcc7420c5d017ae3bf62587925af49f7  lnav-0.12.2.tar.gz
f31767c6425c48cedd9dded6112d37e61ecf316b37678286a09dc64808b0d369978823613076d216a34922d06267695d19fe7797e87eee2315bbb44b3b51ec2c  rapidyaml.patch
6a60e142cbfd1c06d6ca14f16c38d144c134c928d946ac35ee858d8631a7bbf286158a60b62ef2e6967d937484bf8095642c67e1e050ad1d07c43952de9c367b  prqlc-c.patch
"
